package com.liu.demo.Itercptor;

import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author QS.Liu
 * @date 2020/6/18/10:19
 * 拦截器
 */
public class Itercptor implements HandlerInterceptor{
    /**
     * 执行前
     *
     **/
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        return false;
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {

    }
    /**
     * @Description afterCompletion
     * @Date 2020/6/18 10:21
     * @Param [request, response, handler, ex]
     * @return void
     * 执行后
    */
    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {

    }
}
